package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class TestController {
    /**
     * 测试视图解析器
     */
    @RequestMapping("/hello")
    public String hello(Model model, @RequestParam("name")String name) {
        model.addAttribute("name", name);
        return "index";
    }
}